package com.ynet.middleground.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 渠道资源信息表
 * </p>
 *
 * @author Wangxz
 * @since 2020-07-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ur_table_resources")
public class TableResources extends Model<TableResources> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 资源code，表名
     */
    private String tableCode;

    /**
     * 资源名称
     */
    private String tableName;

    /**
     * 资源描述
     */
    private String tableDesc;

    /**
     * 渠道状态  (0:正常 1:停用)
     */
    @TableLogic(delval = "1", value = "0")
    private Integer status;

    /**
     * 创建时间
     */
    private LocalDateTime gmtCreate;

    /**
     * 创建者
     */
    private Integer createBy;

    /**
     * 更新时间
     */
    private LocalDateTime gmtModified;

    /**
     * 更新者
     */
    private Integer modifiedBy;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
